<!DOCTYPE html>
<html lang="zh_CN">
<head>
    <meta charset="UTF-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="shortcut icon" href="/static/assets/img/favicon.png">
    <title>笔记博客 - 后台管理</title>
    <link rel="stylesheet" href="/static/plugins/layui/css/layui.css">
    <link rel="stylesheet" href="/static/plugins/font-awesome/css/font-awesome.min.css">
    <link rel="stylesheet" href="/static/plugins/layui/css/admin.css">
    <link rel="stylesheet" href="/static/assets/css/management/admin.css">
</head>
<body class="layui-layout-body layadmin-tabspage-none">
<div class="layui-layout layui-layout-admin">
    <div class="layui-header">
        <!-- 头部区域（可配合layui已有的水平导航） -->
        <ul class="layui-nav layui-layout-left" lay-filter="nav-icon">
            <li class="layui-nav-item layadmin-flexible">
                <a href="javascript:" layadmin-event="flexible" title="侧边伸缩">
                    <i class="layui-icon layui-icon-shrink-right"></i>
                </a>
            </li>
            <li class="layui-nav-item layui-hide-xs">
                <a href="/" target="_blank" title="前台">
                    <i class="layui-icon layui-icon-website"></i>
                </a>
            </li>
            <li class="layui-nav-item">
                <a href="javascript:" layadmin-event="refresh" title="刷新">
                    <i class="layui-icon layui-icon-refresh"></i>
                </a>
            </li>
        </ul>
        <ul class="layui-nav layui-layout-right">
            <li class="layui-nav-item" lay-unselect="">
                <a href="#/comment" layadmin-event="comment">
                    <i class="layui-icon layui-icon-notice"></i>
                    <!--<span class="layui-badge-dot" ></span>-->
                </a>
            </li>
            <li class="layui-nav-item">
                <a href="javascript:">
                    <img data-th-src="${#strings.isEmpty(avatar)?'/static/assets/img/bmy.png':avatar}"
                         class="layui-nav-img">
                    <span data-th-text="${su.nickname}"></span>
                </a>
                <dl class="layui-nav-child">
                    <dd><a href="#/settings/profile"><i class="fa fa-user"></i> 我的资料</a></dd>
                    <dd><a href="#/settings/common"><i class="fa fa-cogs"></i> 偏好设置</a></dd>
                    <hr>
                    <dd><a href="/management/logout?from=management"><i class="fa fa-sign-out"></i> 退了</a></dd>
                </dl>
            </li>
        </ul>
    </div>

    <div id="left-menu" class="layui-side layui-side-menu ">
        <div class="layui-side-scroll">
            <div class="layui-logo" onclick="BMY.toAdminIndex();"><cite><i
                    class="fa fa-graduation-cap"></i><span>笔记博客</span> <span>后台管理</span></cite>
            </div>
            <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
            <ul class="layui-nav layui-nav-tree" id="left-menu-temp" lay-filter="" lay-shrink="all"></ul>
        </div>
    </div>

    <div id="admin-body" class="layui-body">
        <!-- 内容主体区域 -->
    </div>

    <div class="layui-footer">
        <!-- 底部固定区域 -->
        © <a href="//wuwenbin.me" target="_blank">笔记博客</a> - 后台管理。<a class="layui-hide-sm layui-show-md-inline-block"
                                                                     href="javascript:BMY.coffee4Me();"
                                                                     style="color: #1E9FFF;">支持作者.</a>
    </div>
</div>
<div class="layadmin-body-shade"></div>
<script type="text/html" id="error">
    <div class="vipspa-error">
        {{errContent}}
    </div>
</script>
<script type="text/html" id="left-menu-template">
    {{# layui.each(d[0].data, function(index, item){ }}
    <li class="layui-nav-item">
        {{# if(item.url === null){ }}
        <a href="javascript:"><i class="{{ item.icon }}"></i> <cite>{{ item.name }}</cite></a>
        {{# }else{ }}
        <a href="{{ BMY.transUrl(item.url) }}">
            <i class="{{ item.icon }}"></i> <cite>{{ item.name }}</cite>
        </a>
        {{# } }}
        {{# if(item.data !== null && item.data.length>0){ }}
        <dl class="layui-nav-child">
            {{# layui.each(item.data, function(index, d){ }}
            <dd>
                {{# if(d.url === null){ }}
                <a href="javascript:"><i class="{{ d.icon }}"></i> <cite>{{ d.name }}</cite></a>
                {{# }else{ }}
                <a href="{{ BMY.transUrl(d.url) }}">
                    <i class="{{ d.icon }}"></i> <cite>{{ d.name }}</cite>
                </a>
                {{# } }}
                {{# if(d.data !== null && d.data.length>0){ }}
                <dl class="layui-nav-child">
                    {{# layui.each(d.data, function(index, dd){ }}
                    <dd>
                        {{# if(dd.url === null){ }}
                        <a href="javascript:"><i class="{{ dd.icon }}"></i> <cite>{{ dd.name }}</cite></a>
                        {{# }else{ }}
                        <a href="{{ BMY.transUrl(dd.url) }}">
                            <i class="{{ dd.icon }}"></i> <cite>{{ dd.name }}</cite>
                        </a>
                        {{# } }}
                    </dd>
                    {{# }); }}
                </dl>
                {{# } }}
            </dd>
            {{# }); }}
        </dl>
        {{# } }}
    </li>
    {{# }); }}
</script>
<script src="/static/plugins/jquery/jquery-2.1.4.min.js"></script>
<script src="/static/plugins/vue/vue.min.js"></script>
<script src="/static/plugins/layui/layui.js"></script>
<script src="/static/assets/js/BMY.js"></script>
<script src="/static/plugins/spa/vipspa.js"></script>
<script src="/static/assets/js/management/config/spa.config.js"></script>
<script th:inline="javascript">
    layui.config({base: '/static/plugins/'})
        .extend({
            treetable: 'treetable-lay/treetable'
            , formSelects: 'form-selects/form-selects.v4'
        });

    layui.use(['element', 'layer', 'laytpl'], function () {
        var element = layui.element;
        var laytpl = layui.laytpl;
        window._layer = layui.layer;
        element.render();

        var getTpl = document.getElementById("left-menu-template").innerHTML
            , view = document.getElementById('left-menu-temp');
        laytpl(getTpl).render([[${menus}]], function (html) {
            view.innerHTML = html;
            initLeftMenuCss(location.hash, element);
        });

        element.on('nav(nav-icon)', function (elem) {
            var windowWidth = window.innerWidth;
            var event = $(elem).attr("layadmin-event");
            var select = $(elem).attr("lay-select");
            if (event === 'flexible') {
                if (select === undefined) {
                    $(elem).attr("lay-select", "");
                    if (windowWidth >= 993) {
                        $("body").removeClass("layadmin-side-spread-sm").addClass("layadmin-side-shrink");
                        $("#left-menu-temp").addClass("side-shrink");
                    } else {
                        $("body").removeClass("layadmin-side-shrink").addClass("layadmin-side-spread-sm");
                        $("#left-menu-temp").removeClass("side-shrink");
                    }
                    $(elem).find(".layui-icon").removeClass("layui-icon-spread-right").addClass("layui-icon-spread-left");
                } else {
                    $(elem).removeAttr("lay-select");
                    $("body").removeClass("layadmin-side-shrink").removeClass("layadmin-side-spread-sm");
                    $("#left-menu-temp").removeClass("side-shrink");
                    $(elem).find(".layui-icon").removeClass("layui-icon-spread-left").addClass("layui-icon-spread-right");
                }
            }
            if (event === 'refresh') {
                location.reload();
            }
            if (event === "comment") {
                location.hash = vipspa.stringifyDefault("/comment");
            }
        });
    });


</script>
<script src="/static/assets/js/management/admin_index.js"></script>
</body>
</html>